module.exports = {
    //开启代理服务器(方式一)
    // devServer: {
    //     proxy: 'http://localhost:5000'
    // }
    //方式二
    devServer: {
        proxy: {
            '/api': {
                target: 'http://localhost:5000',
                pathRewrite:{'^/api':''},
                ws: true,//支持websocker
                changeOrigin: true//用于请求头中的host字段
            },
            '/foo': {
                target: 'http://localhost:5001',
                pathRewrite:{'^/foo':''}
            }
        }
    }
}